/**
 * @file exec.c
 * @author lyke (1556553295@qq.com)
 * @brief exec 系统调用
 * @version 0.1
 * @date 2023-02-02
 * 
 * @copyright Copyright (c) 2023
 * 
 */

#include <stdio.h>
#include <sys/types.h>
#include <unistd.h>

int main(int argc, char const *argv[]) {
  int ret;

  /*ececl() 函数必须用 NULL 结尾*/
  ret = execl("/usr/bin/vi", "vi", NULL);
  if (ret == -1) {
    perror("execl");
  }

  return 0;
}
